require 'watir'
include Watir
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
require 'watir/testcase'
require 'watir/contrib/enabled_popup'

class TC_Admin < Test::Unit::TestCase
  def test_09
    $ie.goto($UniVar)
    $ie.refresh()
    $ie.refresh()
    
    $ie.link(:text, 'Control Panel').click
    $ie.link(:text, 'Administration').click
    $ie.table(:index, 12).click
    $ie.link(:index, 22).click
    $ie.select_list(:id, /ctl00_ctl00_TaskRegion_RoleList/).select('Everyone')
    $ie.text_field(:index, 1).value = "Subject of email"
    $ie.ie.Document.parentWindow.execScript("tinyMCE.getInstanceById(tinyMCE.getEditorId('mce_editor_0')).execCommand('mceSetContent', false, '" + $Description + "')")
    $ie.link(:text, 'Send').click
    assert($ie.contains_text('Message successfully sent'))
  end
end